.message {
    margin-bottom: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
}

.user-message {
    background-color: #e3f2fd;
    margin-left: 2rem;
}

.assistant-message {
    background-color: #f5f5f5;
    margin-right: 2rem;
}

.typing {
    display: inline-block;
    width: 1.5rem;
    height: 1.5rem;
}

.loading {
    opacity: 0.5;
    pointer-events: none;
}

.loading::after {
    content: '...';
    animation: dots 1s steps(5, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60% { content: '...'; }
    80% { content: '....'; }
    100% { content: '.....'; }
}

/* Markdown 样式 */
.assistant-message h1,
.assistant-message h2,
.assistant-message h3,
.assistant-message h4,
.assistant-message h5,
.assistant-message h6 {
    margin-top: 1em;
    margin-bottom: 0.5em;
    font-weight: bold;
}

.assistant-message p {
    margin-bottom: 1em;
}

.assistant-message ul,
.assistant-message ol {
    margin-left: 1.5em;
    margin-bottom: 1em;
}

.assistant-message code {
    background-color: #f5f5f5;
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-family: monospace;
}

.assistant-message pre {
    background-color: #f5f5f5;
    padding: 1em;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 1em;
}

.assistant-message blockquote {
    border-left: 4px solid #ddd;
    padding-left: 1em;
    margin-left: 0;
    color: #666;
} 